Ext.onReady(function(){   
      Ext.QuickTips.init();
    Ext.form.Field.prototype.msgTarget = 'side';

        var loginfield = new Ext.form.FormPanel({   
		labelAlign: 'top',
        standardSubmit: true, 
		hideLabels:true,
		labelWidth: 0,
		width:300,
		bodyStyle:'padding:145px 10px 24px',  
		baseCls:'none',   
        defaults: {width: 180,height:24},   
        defaultType: 'textfield',   
                items: [{   
				id:'username',
				name: 'username',
				bodyStyle:'padding:145px 10px 0px',
                allowBlank:false,
				blankText:'您还没有填写用户名',
				maxLength:16,
			 maxLengthText:'用户名长度不正确'
            },  
			{   
			id:'password',
			name: 'password',
			inputType: 'password',
            allowBlank:false,
			blankText:'您还没有填写密码',
			maxLength:16,
			 maxLengthText:'密码长度不正确'
            },  
                        {   
                inputType: 'hidden',   
                id: 'submitbutton',   
                name: 'myhiddenbutton',   
                value: 'hiddenvalue'  
            }   

        ],   
        buttons: [{   
            text: '提交',
            handler: function() {   
                loginfield.getForm().getEl().dom.action = 'include/login.php';
                loginfield.getForm().getEl().dom.method = 'POST';   
                loginfield.getForm().submit();   
            }   
        },
		{   
            text: '注册', 
            handler: function() {   
				location.href='reguser.htm';
            }   
        }
		]   
    });     
    loginfield.render('mainloginDiv');   
  
});  
